Why I signed-up on use Perl, or, why I like PDL

david m on 2009-10-21T13:13:11

I started to give serious time to learning and using Perl this summer. It all started with my frustrations at Matlab. I am a graduate student in Physics and I was trying to analyze some data I had taken. My matlab scripts did an excellent job analyzing data, but I continually found new parameters that needed to be tweaked or held fixed. Since I believe my filenames should be descriptive, the names of my data files kept changing in nontrivial ways.

Those familiar with Perl are aware that Perl was built to process files. Though I did not know much about Perl at the time, I knew that Perl made so easy that which seems so horribly difficult in Matlab. As I beat my head more and more against Matlab's poor file globbing and even poorer regular expression handling, I began to think to myself, "If only I could do numerical programming in Perl..." Then I (re)discovered PDL.

That discovery came in June. Since that time I have aimed to master Perl as best I could. I read the Camel book and PBP, then I got through Perl Testing and just last night I finished reading Perl Hacks. I find myself in a peculiar situation: What do I do next?

The next book on my list will probably be Higher Order Perl, but I decided that the time has come for me to write about what I know. Since my focus is largely on PDL, I find myself drawn to writing about it. This will likely include editing and updating the POD documentation and the wiki, but I also decided that a blog is in order. So, I've signed up for an account on use Perl, and we'll see how it goes.


Welcome to use.perl.org!

sjn on 2009-10-21T14:42:14

Hope you'll find the stay useful. :)

perl and graphics

mw487 on 2009-10-21T15:14:51

I love perl, and I used to often use MatLab for its fabulous ability to crank out a good graph or chart to understand what was going on.

I have not used PDL, but I imagine it can get the computations right.

Does PDL or something in perl do the rough draft presentations of grpahics right? I am not talking publication quality needed, but insight needed.

Thanks for any insights

Re:perl and graphics

david m on 2009-10-23T04:06:41

Yes, PDL does have plotting capabilities. The two semi-standard plotting modules are PGPLOT, which was kinda the original PDL plotting setup, and PLplot, which is the new semi-standard. However, neither of these work out-of-the-box.

The maintainer of PDL - Chris Marshal - has put a lot of effort lately into getting the OpenGL stuff working well with PDL, so I think that 2D and 3D plotting should soon be something that does work out-of-the-box. I can look into this and write about it some time, if you like.

Re:perl and graphics

mw487 on 2009-10-23T14:37:11

Writing more about it would be lovely.

When you say the OpenGL stuff, do you mean there are perl modules of OpenGL plotting routines for 3D? And Chris is integrating them? Or that OpenGL is more like PGPLOT, and Chris has the bigger job of taking non-perl stuff OpenGL and integrating it?

Thanks. My need is not immediate, but I like to keep up.

Re:perl and graphics

david m on 2009-10-23T15:38:17

As I understand it, PDL had its own OpenGL implementation. However, there is a Perl module for OpenGL and Chris has undertaken to get PDL to use the Perl module rather than the PDL-specific one. I'm on the PDL mailing list so I've been seeing emails going back and forth about this stuff, but I don't use OpenGL so I haven't been paying too close attention to it.

I think my next step will be to write an article on PDL for Perl programmers, and then go into setting up and using PLplot. Once I've tackled that, I'll spend some time looking into the OpenGL stuff and write-up what I figure out.

If you have any other ideas for things that you'd like me to write about, I'm all ears. :)

Re:perl and graphics

mw487 on 2009-10-24T14:50:40

Sounds like you have good ideas. Thanks for sharing as you learn.